/*
 * @Author: your name
 * @Date: 2022-02-10 16:23:52
 * @LastEditTime: 2022-02-10 19:36:24
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \jike\src\api\user.js
 */
// 3. api/user.js中封装登录接口
import request from '../utils/request';

export const loginAPI = ({ mobile, code }) => {
  return request({
    url: '/v1_0/authorizations',
    method: 'post',
    data: { mobile, code },
  });
};

/**
 * 获取用户信息
 * @returns Promise
 */
export const getUserInfo = () => {
  return request({
    url: '/v1_0/user/profile',
    method: 'get',
  });
};
